<!DOCTYPE HTML>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>
		<title>管理员列表 - 学生意见管理系统</title>
		<meta th:replace="~{/include/all_include ::  title}"/>
		<link
			th:href="@{/common/resource/H-ui.admin/static/h-ui.admin/css/H-ui.login.css}"
			rel="stylesheet" type="text/css" />
		<meta name="keywords" content="学生意见管理系统-登录">
		<meta name="description" content="学生意见管理系统-登录">
		</head>
	<body>
		<nav class="breadcrumb">
			<i class="Hui-iconfont">&#xe67f;</i> 首页
			<span class="c-gray en">&gt;</span>权限模块 
			<span class="c-gray en">&gt;</span> 管理员列表 
			<a class="btn btn-success radius r" style="line-height: 1.6em; margin-top: 3px"
				href="javascript:location.replace(location.href);" title="刷新">
				<i class="Hui-iconfont">&#xe68f;</i>
			</a>
		</nav>
		<div class="page-container">
			<form th:action="@{/back/users/adminsList}" method="post">
				<div class="text-c">
					<input type="text" name="keyword" id="" th:value="${keyword }" placeholder="请输入关键字"
						   style="width: 250px" class="input-text">
					<span class="select-box inline">
						状态:
						<select name="status" class="select">
							<option value="">请选择</option>
							<option value="1" th:selected="${status == '1'}">启用</option>
							<option value="0" th:selected="${status == '0'}">禁用</option>
						</select>
					</span>
					日期范围：
					<input type="text" readonly="readonly" th:value="${st }"
						   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
						   name="st" class="input-text Wdate" style="width: 170px;">
					- <input type="text" readonly="readonly"  th:value="${ed }"
							 onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
							 name="ed" class="input-text Wdate" style="width: 170px;">
					<button name="" id="" class="btn btn-success" type="submit">
						<i class="Hui-iconfont">&#xe665;</i> 搜索
					</button>
				</div>
			</form>
			<div class="cl pd-5 bg-1 bk-gray mt-20">
				<span class="l">
					<a class="btn btn-primary radius" data-title="添加管理员"
						th:data-href="@{/back/users/adminsInsert}" onclick="Hui_admin_tab(this)"
						href="javascript:;">
						<i class="Hui-iconfont">&#xe600;</i> 添加管理员
					</a>
				</span>
				<span class="r">共有数据：<strong th:text="${response?.data?.pageInfoUtil?.totalRecord}"></strong> 条
				</span>
			</div>
			<div class="mt-20">
				<div id="DataTables_Table_0_wrapper"
					class="dataTables_wrapper no-footer">
					<form id="formId" method="post"
						  th:action="@{/back/users/adminsInfo}" onsubmit="return vailForm('formId','ids')">
						<table
							class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
							<thead>
								<tr class="text-c">
									<th width="40">Id</th>
									<th width="100">邮箱</th>
									<th width="90">手机号</th>
									<th width="90">qq</th>
									<th width="80">状态</th>
									<th width="80">登录次数</th>
									<th width="120">创建时间</th>
									<th width="120">更新时间</th>
									<th width="120">上次登录时间</th>
									<th width="80">操作</th>
								</tr>
							</thead>
							<tbody>
								<th:block th:each="oneTemp : ${response?.data?.list}">
									<tr class="text-c">
										<td th:text="${oneTemp.id }"></td>
										<!-- 对象.属性,对象没有这个属性,一般在属性后面添加? -->
										<td class="text-l">
											<u style="cursor: pointer" class="text-primary" data-title="管理员详情" title="管理员详情"
											   th:data-href="@{/back/users/adminsUpdate?(id=${oneTemp.id })}"
												onClick="Hui_admin_tab(this)"
												th:text="${oneTemp.email }">
											</u>
										</td>
										<td th:text="${oneTemp.phone }"></td>
										<td th:text="${oneTemp.qq }"></td>
										<td class="td-status">
											<span class="label label-success radius">
												<span class="label label-success radius">
												<span th:if="${oneTemp.status == 1 }">启用</span>
												<span th:if="${oneTemp.status == 0 }">禁用</span>
											</span>
										</td>
										<td th:text="${oneTemp.loginCount}"></td>
										<td th:text="${oneTemp.createTime}"></td>
										<td th:text="${oneTemp.updateTime}"></td>
										<td th:text="${oneTemp.lastLoginTime}"></td>
										<td class="f-14 td-manage">
											<a style="text-decoration: none" class="ml-5" data-title="管理员更新" title="管理员更新"
												th:data-href="@{/back/users/adminsUpdate(operType='updateInfo',id =${oneTemp.id })}"
												onclick="Hui_admin_tab(this)"
												href="javascript:;">
												<i class="Hui-iconfont">&#xe6df;</i>
											</a>
											<a style="text-decoration: none" class="ml-5" data-title="管理员重置密码" title="管理员重置密码"
												onclick="Hui_admin_tab(this)"
											   	th:data-href="@{/back/users/adminsUpdatePassword(operType='updateInfo',id =${oneTemp.id })}"
												href="javascript:;">
												<i class="Hui-iconfont">&#xe605;</i>
											</a>

											<a style="text-decoration: none" class="ml-5" onClick="article_del(this,'10001')" href="javascript:;"
												title="删除"><i class="Hui-iconfont">&#xe6e2;</i>
											</a>
										</td>
									</tr>
								</th:block>
							</tbody>
						</table>
					</form>
					<form id="pageForm" th:action="@{/back/users/adminsList}" method="post">
						<input type="hidden" name="keyword" th:value="${keyword}">
						<input type="hidden" name="status" th:value="${status}">
						<input type="hidden" name="st" th:value="${st}">
						<input type="hidden" name="ed" th:value="${ed}">
						<div class="dataTables_info" id="DataTables_Table_0_info"
							 role="status" aria-live="polite">共<span th:text="${response?.data?.pageInfoUtil?.totalRecord}"></span>页，共<span th:text="${response?.data?.pageInfoUtil?.totalPage}"></span>条</div>
						<div class="dataTables_paginate paging_full_numbers"
							 id="DataTables_Table_0_paginate">
							<a class="paginate_button previous disabled"
							   aria-controls="DataTables_Table_0" data-dt-idx="0" tabindex="0"
							   th:onclick="return pageFormSubmit('pageForm','current','1','size',[[${response?.data?.pageInfoUtil?.pageSize}]])"
							   id="DataTables_Table_0_previous">
								首页
							</a>
							<a class="paginate_button previous disabled"
							   aria-controls="DataTables_Table_0" data-dt-idx="0" tabindex="0"
							   th:onclick="return pageFormSubmit('pageForm', 'current', '[[${response?.data?.pageInfoUtil?.prePage}]]', 'size',[[${response?.data?.pageInfoUtil?.pageSize}]])"
							   id="DataTables_Table_0_previous">
								上一页
							</a>
							<a class="paginate_button next disabled"
							   aria-controls="DataTables_Table_0" data-dt-idx="2" tabindex="0"
							   th:onclick="return pageFormSubmit('pageForm', 'current', '[[${response?.data?.pageInfoUtil?.nextPage}]]', 'size',[[${response?.data?.pageInfoUtil?.pageSize}]])"
							   id="DataTables_Table_0_next">
								下一页
							</a>
							<a class="paginate_button next disabled"
							   aria-controls="DataTables_Table_0" data-dt-idx="2" tabindex="0"
							   th:onclick="return pageFormSubmit('pageForm', 'current', '[[${response?.data?.pageInfoUtil?.totalPage}]]', 'size',[[${response?.data?.pageInfoUtil?.pageSize}]])"
							   id="DataTables_Table_0_next">
								尾页
							</a>
							<span>
								第<input type="text" class="paginate_button" id="current" name="currentPage" th:value="${response?.data?.pageInfoUtil?.currentPage}" size="5" maxlength="5">页
                            每页<input type="text" class="paginate_button" id="size" name="pageSize" th:value="${response?.data?.pageInfoUtil?.pageSize}" size="5" maxlength="5">条
								<input class="paginate_button" type="submit" value="GO">
							</span>
						</div>
					</form>
				</div>
			</div>
		</div>
		<footer th:replace="~{/include/all_include ::  footer}"/>
	
		<!--请在下方写此页面业务相关的脚本-->
		<script type="text/javascript"
			th:src="@{/common/resource/H-ui.admin/lib/My97DatePicker/4.8/WdatePicker.js }"></script>
		<script type="text/javascript"
			th:src="@{/common/resource/H-ui.admin/lib/datatables/1.10.15/jquery.dataTables.min.js}"></script>
		<script type="text/javascript" th:src="@{/common/resource/H-ui.admin/lib/laypage/1.2/laypage.js}"></script>
		<script type="text/javascript">
			/*资讯-添加*/
			function article_add(title, url, w, h) {
				var index = layer.open({
					type : 2,
					title : title,
					content : url
				});
				layer.full(index);
			}
			/*资讯-编辑*/
			function article_edit(title, url, id, w, h) {
				var index = layer.open({
					type : 2,
					title : title,
					content : url
				});
				layer.full(index);
			}
			/*资讯-删除*/
			function article_del(obj, id) {
				layer.confirm('确认要删除吗？', function(index) {
					$.ajax({
						type : 'POST',
						url : '',
						dataType : 'json',
						success : function(data) {
							$(obj).parents("tr").remove();
							layer.msg('已删除!', {
								icon : 1,
								time : 1000
							});
						},
						error : function(data) {
							console.log(data.msg);
						},
					});
				});
			}
		</script>
	</body>
</html>